<?php
require_once('libraryfiles/config.php');
$_SESSION['shoppingReturnUrl'] = $_SERVER['REQUEST_URI'];
$content = 'index.php';
if (isset($_GET['do']) == 'logout') {
    doUserLogout();
    exit;
}
$include = '';
$get_config_title = select(Tblrefcode::tblname, array(Tblrefcode::value), array(Tblrefcode::name => 'site_title', Tblrefcode::type => 'global_setting'));
$row_config_title = mysql_fetch_assoc($get_config_title);
$site_title = ((!empty($row_config_title))?$row_config_title[Tblrefcode::value]:$lang['PAGE_TITLE']);
$site_description = getmeta_tag('description', '', 1);
$site_keywords = getmeta_tag('keyword', '', 1);
require_once TMP_USER_PATH;

$char = 20;
$obj = new sub_class();
$cateobj = new by_category();
?>


<!--Messsage-->
<?php
if (isset($_GET ['success']) != "") {
    $message = $_GET ['success'];
    // if we got an error then we display it here
    if ($message) {
        ?>
        <div class="alert alert-success fade in">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <h3 class="alert-heading">
                <!--Well done! You successfully.-->
                <?php echo $lang['SUCCESSSMS']; ?></h3>
            <p style="font-size: 16px;">
            <blink><?php echo @$lang[$message]; ?></blink>
        </p>
        </div>
        <?php
    }
}
?>
<!--End Message-->
<!--Messsage error-->
<?php
if (isset($_GET ['error']) != "") {
    $message = $_GET ['error'];
    // if we got an error then we display it here
    if ($message) {
        ?>
        <div class="alert alert-error fade in">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <h3 class="alert-heading">
                <!--Well done! You successfully.-->
                <?php echo $lang['SNAB_ERROO']; ?></h3>
            <p style="font-size: 16px;">
            <blink><?php echo @$lang[$message]; ?></blink>
        </p>
        </div>
        <?php
    }
}
?>
<!--End Message error-->

<div class="row-fluid">    <!--slide show-->
            <div class="span9">
                <link rel="stylesheet" type="text/css" href="<?php echo W_ROOT; ?>/feature/css/slideshow.css" media="all" />
                <script type="text/javascript" src="<?php echo W_ROOT; ?>/feature/js/slider.js"></script>
                <script type="text/javascript" src="<?php echo W_ROOT; ?>/feature/js/jquery_005.js"></script>
                <script type="text/javascript" src="<?php echo W_ROOT; ?>/feature/js/jquery_004.js"></script>
                <script type="text/javascript" src="<?php echo W_ROOT; ?>/feature/js/efects.js"></script>
                <?php
                include(S_ROOT . '/feature/coin-slider.php');
                include(S_ROOT . '/includefiles/banner_ads_content.php');
                ?>
            </div>
            <div class="span3">
                <!-- cambodia map -->
                <div id="map-container" class="box box-content">
                	 <div class="box-heading heading-box"><h2>Search By Map</h2></div>
                    <img src="<?php echo base_url; ?>images/img/map.png" alt="" width="600" height="484" border="0" usemap="#regionMapView" class="map" />

                    <map name="regionMapView" id="regionMapView">
                        <area id="area-ASIKHM001" data-name="Banteay Meanchey" shape="poly" coords="19,138,25,126,95,53,116,67,115,88,129,83,142,94,137,153,109,147,88,153,63,146,49,158,25,147" href="<?php echo base_url;?>product/?searchby=1&province=24" />
                        <area id="area-ASIKHM002" data-name="Battambang" shape="poly" coords="25,148,50,157,63,146,88,154,108,148,136,153,141,156,152,156,157,161,165,161,173,177,188,190,170,196,166,209,158,212,158,244,155,247,141,247,126,240,97,254,89,249,86,254,69,258,62,253,63,249,49,232,64,226,66,184,59,174,51,174,45,180,45,187,35,187,28,182,28,174,21,163" href="<?php echo base_url;?>product/?searchby=1&province=15" />
                        <area id="area-ASIKHM003" data-name="Kampong Cham" shape="poly" coords="294,278,300,276,328,285,329,280,321,263,329,259,345,265,350,252,362,257,368,250,385,250,391,261,391,271,387,275,396,277,395,283,410,284,419,291,419,295,435,302,435,310,459,312,463,323,458,333,463,339,463,343,455,343,447,343,440,336,416,333,409,347,399,344,389,340,384,335,353,333,350,322,342,321,324,333,313,333,312,326,306,321,301,320,296,326,289,325,287,317,290,308,295,305,293,298" href="<?php echo base_url;?>product/?searchby=1&province=16" />
                        <area id="area-ASIKHM004" data-name="Kampong Chhnang" shape="poly" coords="243,246,253,245,262,238,288,245,291,263,295,263,295,267,290,273,294,279,294,305,288,317,280,325,266,326,256,336,236,330,234,326,225,314,226,306,221,304,215,284,219,274,231,270" href="<?php echo base_url;?>product/?searchby=1&province=17" />
                        <area id="area-ASIKHM005" data-name="Kampong Speu" shape="poly" coords="218,300,221,305,226,305,224,314,235,330,257,337,267,327,277,326,269,368,280,368,282,374,273,382,270,407,264,409,240,400,226,407,218,407,205,390,206,377,201,368,205,363,197,358,191,358,187,354,180,352,174,346,171,336,173,327,171,321,184,322,190,312,195,310,202,314,210,300" href="<?php echo base_url;?>product/?searchby=1&province=18" />
                        <area id="area-ASIKHM006" data-name="Kampong Thom" shape="poly" coords="220,217,237,205,237,200,248,196,251,175,261,166,276,161,296,160,294,174,303,188,319,178,323,178,326,171,336,166,364,148,367,152,366,167,371,169,370,179,376,184,376,197,378,202,377,206,381,210,385,249,368,250,361,257,351,253,344,264,328,258,321,264,328,284,300,276,295,278,290,273,295,266,296,261,291,261,290,257,289,254,289,246,288,245,263,238,253,246,243,246,219,229" href="<?php echo base_url;?>product/?searchby=1&province=12" />
                        <area id="area-ASIKHM007" data-name="Kampot" shape="poly" coords="186,424,191,417,204,415,205,412,201,410,205,401,214,400,217,407,226,407,240,400,242,402,239,411,250,411,256,421,253,430,260,430,267,427,272,431,273,439,274,446,271,452,269,459,272,461,273,468,263,467,248,481,242,475,243,468,239,462,234,460,227,460,226,465,199,465,189,461,189,453,187,448,189,429" href="<?php echo base_url;?>product/?searchby=1&province=9" />
                        <area id="area-ASIKHM012" data-name="Phnom Penh" shape="poly" coords="283,346,295,340,297,343,299,353,302,359,301,364,294,363,288,369,283,367,284,357,281,353,282,346" href="<?php echo base_url;?>product/?searchby=1&province=1" />
                        <area id="area-ASIKHM008" data-name="Kandal" shape="poly" coords="278,326,286,318,288,325,296,327,301,320,305,320,313,326,312,333,323,333,319,344,318,355,338,369,337,372,333,375,337,387,326,411,326,427,319,425,317,422,310,426,307,420,305,419,308,400,299,390,299,380,284,378,282,375,280,368,269,367" href="<?php echo base_url;?>product/?searchby=1&province=13" />
                        <area id="area-ASIKHM009" data-name="Koh Kong" shape="poly" coords="68,301,74,302,89,302,103,310,126,303,131,293,137,294,141,292,147,293,154,301,157,301,158,306,163,308,166,313,175,312,181,321,171,322,174,327,171,334,173,341,173,346,180,352,186,354,189,358,199,358,205,364,200,369,205,375,205,390,212,400,206,401,202,410,205,412,204,415,192,417,186,423,181,426,173,426,169,441,161,443,165,430,161,419,159,409,148,402,140,402,135,429,121,451,108,448,99,424,88,386,66,309" href="<?php echo base_url;?>product/?searchby=1&province=11" />
                        <area id="area-ASIKHM013" data-name="Preah Vihear" shape="poly" coords="250,46,254,44,260,48,266,41,275,37,277,42,287,38,306,45,306,51,311,62,321,60,324,47,329,47,331,58,345,74,354,74,368,67,382,74,389,74,391,82,407,94,382,94,382,100,364,101,363,114,367,118,371,129,365,149,337,164,325,169,322,178,317,178,304,188,295,174,296,160,277,160,261,166,260,151,269,147,269,143,274,140,274,137,269,139,256,134,245,134,247,125,247,114,239,105,247,93,246,81,257,68,250,64" href="<?php echo base_url;?>product/?searchby=1&province=8" />
                        <area id="area-ASIKHM019" data-name="Stung Treng" shape="poly" coords="364,101,382,101,383,93,407,94,424,97,423,87,432,81,424,73,417,62,411,46,432,46,438,43,438,30,448,36,458,35,471,18,481,37,483,59,476,74,481,84,481,107,496,112,506,130,487,137,475,132,472,140,482,158,471,158,458,150,443,153,438,157,427,156,417,166,417,173,412,170,405,181,398,182,384,175,372,170,367,167,367,153,365,146,371,128,367,116,363,114" href="<?php echo base_url;?>product/?searchby=1&province=6" />
                        <area id="area-ASIKHM016" data-name="Ratanak Kiri" shape="poly" coords="482,37,491,38,502,53,515,49,522,37,529,41,546,30,552,19,567,26,574,8,583,11,575,31,571,41,563,42,559,51,561,58,555,72,560,84,569,86,571,111,588,138,587,161,568,161,560,166,545,157,539,161,531,160,531,175,527,177,496,175,478,158,477,146,473,137,475,133,487,136,505,130,497,112,482,107,480,80,476,74,482,59" href="<?php echo base_url;?>product/?searchby=1&province=2" />
                        <area id="area-ASIKHM022" data-name="Otdar Meanchey" shape="poly" coords="101,57,110,49,121,45,135,45,155,39,166,39,170,45,191,47,197,45,204,49,211,44,218,48,220,41,228,45,229,42,235,45,250,46,249,64,244,66,238,71,230,75,224,75,219,81,216,80,205,74,206,66,196,69,176,73,176,82,165,88,160,88,154,95,141,95,140,93,134,90,129,83,116,86,116,70,114,64" href="<?php echo base_url;?>product/?searchby=1&province=20" />
                        <area id="area-ASIKHM017" data-name="Siem Reap" shape="poly" coords="143,95,152,95,159,89,169,88,176,83,175,74,206,67,206,74,219,82,226,76,234,74,248,65,257,70,247,79,247,93,240,105,247,114,244,135,273,140,267,148,260,150,261,166,250,176,248,197,237,201,236,206,220,217,172,178,164,160,156,161,152,156,141,156,136,153,138,141" href="<?php echo base_url;?>product/?searchby=1&province=4" />
                        <area id="area-ASIKHM024" data-name="Pailin" shape="poly" coords="37,187,45,186,45,180,51,175,59,175,65,184,66,224,48,234,37,231,42,216,38,213,38,204,42,196" href="<?php echo base_url;?>product/?searchby=1&province=21" />
                        <area id="area-ASIKHM015" data-name="Pursat" shape="poly" coords="67,257,79,257,86,254,88,249,96,257,125,240,141,247,157,246,159,212,168,210,171,195,187,191,219,218,219,230,243,249,240,252,231,271,222,273,214,285,219,301,208,301,203,313,195,312,186,314,184,320,173,313,165,312,157,302,147,293,140,291,137,295,131,292,126,304,105,309,90,301,68,300,61,287,61,267" href="<?php echo base_url;?>product/?searchby=1&province=19" />
                        <area id="area-ASIKHM010" data-name="Kratie" shape="poly" coords="371,171,386,176,395,183,404,182,412,170,418,174,417,165,428,155,440,157,444,152,451,154,453,160,449,167,462,176,452,177,451,187,459,195,464,195,480,206,479,213,463,224,456,236,454,246,465,257,476,261,481,272,495,276,499,282,502,295,501,300,496,299,490,310,470,308,467,311,464,308,460,309,436,310,435,302,420,295,418,288,412,282,398,282,396,276,386,274,391,268,389,260,385,249,381,208,378,200" href="<?php echo base_url;?>product/?searchby=1&province=7" />
                        <area id="area-ASIKHM011" data-name="Mondul Kiri" shape="poly" coords="451,153,459,151,472,158,478,158,485,166,496,174,529,177,533,170,532,160,538,162,545,159,554,162,562,166,570,161,584,162,573,192,574,196,574,211,582,217,584,242,583,254,578,270,571,272,567,280,556,270,535,275,533,281,512,302,503,300,501,285,491,277,483,273,476,263,467,256,456,248,457,234,473,218,480,205,469,195,455,188,451,178,459,177,450,167,452,157" href="<?php echo base_url;?>product/?searchby=1&province=3" />
                        <area id="area-ASIKHM014" data-name="Prey Veng" shape="poly" coords="318,355,317,344,324,334,342,321,351,322,353,332,384,336,387,341,397,343,393,352,381,353,374,384,379,388,375,389,371,399,375,403,367,420,352,420,341,432,333,429,327,427,326,411,336,389,335,374,338,370" href="<?php echo base_url;?>product/?searchby=1&province=22" />
                        <area id="area-ASIKHM020" data-name="Svay Rieng" shape="poly" coords="382,352,393,351,405,360,402,369,399,384,404,386,404,395,416,396,416,401,424,411,432,406,435,420,428,421,429,426,434,432,436,441,429,440,421,438,409,430,404,437,398,433,399,427,387,413,368,421,374,401,371,398,377,387,377,383,379,366" href="<?php echo base_url;?>product/?searchby=1&province=23" />
                        <area id="area-ASIKHM018" data-name="Preah Sihanouk" shape="poly" coords="151,445,168,441,173,427,186,424,189,431,187,447,190,462,183,452,181,461,178,477,173,479,166,472,156,474,154,466,146,464,140,457" href="<?php echo base_url;?>product/?searchby=1&province=5" />
                        <area id="area-ASIKHM023" data-name="Kep" shape="poly" coords="226,464,232,459,238,462,242,472,242,478,236,475,228,475,225,469" href="<?php echo base_url;?>product/?searchby=1&province=16" />
                        <area id="area-ASIKHM021" fill="#ff0000" data-name="Takeo" shape="poly" coords="241,401,266,409,271,407,274,383,281,376,285,379,298,379,298,391,308,402,304,419,316,447,300,457,291,469,274,466,269,459,273,443,273,431,265,426,255,429,256,419,252,411,240,410" href="<?php echo base_url;?>product/?searchby=1&province=14" />
                    </map>

                    <img id="image-ASIKHM001" src="<?php echo base_url; ?>images/img/map/01.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM002" src="<?php echo base_url; ?>images/img/map/02.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM003" src="<?php echo base_url; ?>images/img/map/03.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM004" src="<?php echo base_url; ?>images/img/map/04.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM005" src="<?php echo base_url; ?>images/img/map/05.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM006" src="<?php echo base_url; ?>images/img/map/06.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM007" src="<?php echo base_url; ?>images/img/map/07.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM008" src="<?php echo base_url; ?>images/img/map/08.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM009" src="<?php echo base_url; ?>images/img/map/09.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM010" src="<?php echo base_url; ?>images/img/map/10.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM011" src="<?php echo base_url; ?>images/img/map/11.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM012" src="<?php echo base_url; ?>images/img/map/12.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM013" src="<?php echo base_url; ?>images/img/map/13.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM014" src="<?php echo base_url; ?>images/img/map/14.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM015" src="<?php echo base_url; ?>images/img/map/15.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM016" src="<?php echo base_url; ?>images/img/map/16.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM017" src="<?php echo base_url; ?>images/img/map/17.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM018" src="<?php echo base_url; ?>images/img/map/18.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM019" src="<?php echo base_url; ?>images/img/map/19.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM020" src="<?php echo base_url; ?>images/img/map/20.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM021" src="<?php echo base_url; ?>images/img/map/21.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM022" src="<?php echo base_url; ?>images/img/map/22.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM023" src="<?php echo base_url; ?>images/img/map/23.png" alt="" width="600" height="484" border="0" class="region" />
                    <img id="image-ASIKHM024" src="<?php echo base_url; ?>images/img/map/24.png" alt="" width="600" height="484" border="0" class="region" />

                    <img src="<?php echo base_url; ?>images/img/map.png" alt="" width="620" height="484" border="0" class="regionBg" />
                    <div class="box nonbox">
                        <div class="box-heading nonbox">
                            <h2 align="center"><span id="map-province-name">Search by Map</span></h2>
                        </div>
                    </div>
                </div>
                <script src="<?php echo base_url; ?>js/map/script.js"></script>
                <script src="<?php echo base_url; ?>js/map/jquery.rwdImageMaps.min.js"></script>
                <script type="text/javascript">
                    $(document).ready(function() {
                        $("#map-container area").hover(function() {
                            var image = $('#image-' + $(this).attr('id').replace("area-", ""));
                            var province = $(this).attr('id').replace("area-", "");
                            image.stop(true, true).addClass('hover', 'fast');
                            $("#map-province-name").html($(this).data("name"));
                        }, function() {
                            var image = $('#image-' + $(this).attr('id').replace("area-", ""));
                            image.stop(true, true).removeClass('hover', 'fast');
                            $("#map-province-name").html("");
                        });

                        $(document).ready(function(e) {
                            $('img[usemap]').rwdImageMaps();
                            $('.carousel').carousel()
                        });
                    });

                </script>
                <!-- end cambodia map prepare by Socheat -->
            </div>
        </div>

        <!--content-->
        <div class="row-fluid">
            <div class="span9 home product-home">
                <div id="content">
                    <!-----lastest----->
                    <div class="box laster custom">
                        <div class="box-heading heading-box"><h2>POPULAR ADS</h2></div>
                        <div class="box-content">
                            <div class="product-grid">
                                <?php

                                include("latest_premium.php");
                                ?>

                            </div>
                        </div>
                         <div class="box-heading"><h2 align="center">
                        	<a class="view-all-homepage" href="<?php echo base_url;?>/show_all.php?view=last_premium">See More</a>
                        </h2></div>
                    </div>
                    <!-----the end lastest----->
                     <!-----Free-user----->
                    <div class="box laster custom">
                        <div class="box-heading heading-box"><h2>LATEST</h2></div>
                        <div class="box-content">
                            <div class="product-grid">
                                <?php include("latest_free.php");?>
                            </div>
                            <?php
                            //if (!empty($pagingLink)) {
                                ?>
                                <!--<div class="row-fluid box-product">
                                    <div class="span12">
                                        <div class="pagination">
                                            <div class="links">
                                                <?php //echo $pagingLink; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                --><?php
                          //  }
                            ?>

                        </div>
                        <div class="box-heading"><h2 align="center">
                        	<a class="view-all-homepage" href="<?php echo base_url;?>/show_all.php?view=last_free">See More</a>
                        </h2></div>
                    </div>


                    <!-----the end free user----->
                    <!--==============Advertisement here-->
                    <?php include(S_ROOT . '/includefiles/home_bottom_advertise.php'); ?>
                </div>
            </div>
            <!--end content-->

            <!--sidebar-->
            <aside class="span3">
                <div class="sidebar">
                    <?php include(S_ROOT . '/templates/sidebar-home.php'); ?>
                </div>

            </aside><!--<div class="three columns">-->
            <!-- end sidebar-->
            <div class="clear"></div>
        </div>
